package com.eqdd.yiqidian.ui.gongneng.renshi.contract;

import android.view.View;

import com.eqdd.annotation.datasave.DealCodeClass;
import com.eqdd.yiqidian.bean.EnterBean;
import com.eqdd.yiqidian.ui.base.BaseEnterActivity;
import com.eqdd.yiqidian.ui.gongneng.renshi.RenshiActivity$$DealCodeInjector;
import com.eqdd.yiqidian.utils.ToastUtil;

/**
 * Created by lvzhihao on 17-4-19.
 */

public class ContractManageActivity extends BaseEnterActivity {
    private String[] contents = new String[]{
//            "任务待办",
//            "已办任务",
//            "合同台帐",
            "劳动合同",
            "流程查询"
    };
    private int[] decoders = new int[]{12};
    private Class[] classes = new Class[]{
            ShowHRContractActivity.class,
            null
    };

    @DealCodeClass(classes = {ShowHRContractActivity.class})
    public void updateLaodonghetong(int num) {
        updateNum(4, num);
    }

    @Override
    public void itemClick(int p) {
        if (classes[p] != null) {
            startActivity(classes[p]);
        } else {
            ToastUtil.showShort("该模块暂未开发");
        }
    }

    @Override
    public void initEnterData() {
        isDealCode = true;
        initTopTitleBar(View.VISIBLE, "劳动合同管理");
        int index = 0;
        for (int i = 0; i < contents.length; i++) {
            EnterBean enterBean = new EnterBean();
            if (i == 0) {
                enterBean.setTop(false);
            }
            if (index < decoders.length && i == decoders[index]) {
                index++;
                enterBean.setBottom(true);
                enterBean.setUnderLine(false);
            }
            enterBean.setContent(contents[i]);
            enterBean.setIcon(false);

            enterBean.setEnter(true);
            enterBeans.add(enterBean);
        }
    }

    @Override
    public void lastRun() {
        if (register != null) {
            ((ContractManageActivity$$DealCodeInjector) register).update1();
        }
    }
}
